package exceptions.service;

import exceptions.AppRuntimeException;

/**
 * 服务异常
 */
public class ServiceRuntimeException extends AppRuntimeException {

    public ServiceRuntimeException(String code, String message) {
        super();
        this.code = code;
        this.message = message;
    }

    public ServiceRuntimeException(String code, String message, Throwable t) {
        super();
        this.code = code;
        this.message = message;
    }

    public ServiceRuntimeException(String message) {
        super(message);
        this.message = message;
    }

    public ServiceRuntimeException(String message, Throwable t) {
        super(message, t);
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "DaoRuntimeException [code=" + code + ", message=" + message + "]";
    }
}
